home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_vol_conelavaambients.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  76 lines

  1. # Jones 3D Cog Script
  2. #
  3. # VOL_ConeSideAmbients.cog
  4. #
  5. # Produces random ambient cave sounds when crossing adjoins
  6. # Based on code from TEO_Drops.cog by SXC.
  7. #
  8. # [TRM & SXC]  modified 12/3 by [CMG]
  9. #
  10. # (C) 1998 LucasArts Entertainment Co. All Rights Reserved
  11. # ========================================================================================
  12.  
  13. symbols
  14.  
  15.  
  16.     #................MESSAGES........................
  17.     message     startup
  18.     message     crossed
  19.     
  20.     
  21.     #................ACTORS..........................
  22.     thing        player                                    local
  23.     
  24.     
  25.     #................PROPS..........................
  26.     thing        sndPos0
  27.     thing        sndPos1
  28.     thing        sndPos2
  29.  
  30.     #................TRIGGERS........................
  31.     surface       oncross               
  32.     
  33.     surface       offcross              
  34.     
  35.             
  36.     #................SOUNDS........................
  37.     sound       lavarun=gen_lava_flow_a.wav                local
  38.     
  39.         
  40.     #................VARIABLES........................
  41.     int            snd0                                    local    # channel            
  42.     int            snd1                                    local    # channel        
  43.     int            snd2                                    local    # channel        
  44.  
  45. end
  46.  
  47. # ========================================================================================
  48. code
  49.  
  50. startup:
  51.     
  52.     player = GetLocalPlayerThing();
  53.     return;
  54.  
  55. # ========================================================================================
  56. crossed:
  57.  
  58.     If ((GetSenderRef() == oncross) && (GetSourceref() == player))
  59.         {
  60.         snd0=PlaySoundThing(lavarun, sndPos0, 0.5, 4, 20, 0x1);
  61.         snd1=PlaySoundThing(lavarun, sndPos1, 0.5, 4, 20, 0x1);
  62.         snd2=PlaySoundThing(lavarun, sndPos2, 0.5, 4, 20, 0x1);
  63.         }
  64.     
  65.     If ((GetSenderRef() == offcross) && (GetSourceref() == player))
  66.         {
  67.         StopSound(snd0, 0.5);
  68.         StopSound(snd1, 0.5);
  69.         StopSound(snd2, 0.5);
  70.         }
  71.  
  72. return;
  73.  
  74. # ========================================================================================
  75. end
  76.